﻿module QuickStart {
    interface Person {
        firstname: string;
        lastname: string;
    }
    class Student {
        fullname: string;//public prop
        constructor(public firstname, public middleinitial, public lastname) {//构造函数使用public 则自动创建属性。
            this.fullname = firstname + " " + middleinitial; + " " + lastname;
        }
    }
    //打招呼
    function greeter(person: Person) {//打招呼1
        return "Hello," + person.firstname + " " + person.lastname;
    }
    var user = new Student("Jane", "M", "User");
    document.body.innerHTML = greeter(user);
}